﻿@model CMS2.Models.Student

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Student</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.RollNo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.RollNo)
            @Html.ValidationMessageFor(model => model.RollNo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Username)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Username)
            @Html.ValidationMessageFor(model => model.Username)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FatherName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FatherName)
            @Html.ValidationMessageFor(model => model.FatherName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Gender)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model=>model.Gender,new[]{
            new SelectListItem{Text="Male", Value = "male"},
            new SelectListItem{ Text = "Female", Value = "female"}          
           
            })
            
            @Html.ValidationMessageFor(model => model.Gender)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DateOfBirth)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DateOfBirth)
            @Html.ValidationMessageFor(model => model.DateOfBirth)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.AdmissionDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.AdmissionDate)
            @Html.ValidationMessageFor(model => model.AdmissionDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Degree)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Degree)
            @Html.ValidationMessageFor(model => model.Degree)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.MobileNo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MobileNo)
            @Html.ValidationMessageFor(model => model.MobileNo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LandLineNo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LandLineNo)
            @Html.ValidationMessageFor(model => model.LandLineNo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Address)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Address)
            @Html.ValidationMessageFor(model => model.Address)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
